RDF Schema

RDF Schema
Current Status Published
Year Started 1998
Editors Dan Brickley, Ramanathan V. Guha
Base Standards RDF
Related Standards OWL
Domain Semantic Web
Abbreviation RDFS
Website RDF Schema

RDF Schema (variously abbreviated as RDFS, RDF(S), RDF-S, or RDF/S) is a set of classes with certain properties using the RDF extensible knowledge representation language, providing basic elements for the description of ontologies, otherwise called RDF vocabularies, intended to structure RDF resources. These structured elements with RDFS in a triplestore, you can use the query language SPARQL to reach them.

The first version[1] was published by the World-Wide Web Consortium (W3C) in April 1998, and the final[2] W3C recommendation was released in February 2004. Many RDFS components are included in the more expressive language Web Ontology Language (OWL).

Contents

Main RDFS constructs

RDFS constructs are the RDFS classes, associated properties and utility properties built on the limited vocabulary of RDF.

Classes

A typical example of an rdfs:Class is foaf:Person in the Friend of a Friend (FOAF) vocabulary. An instance of foaf:Person is a resource that is linked to the class foaf:Person using the rdf:type property, such as in the following formal expression of the natural language sentence : 'John is a Person'.

ex:John rdf:type foaf:Person

The definition of rdfs:Class is recursive: rdfs:Class is the rdfs:Class of any rdfs:Class.

The other classes described by the RDF and RDFS specifications are:

Properties

Properties are instances of the class rdf:Property and describe a relation between subject resources and object resources. When used as such a property is a predicate (see also RDF: reification).

For example, the following declarations are used to express that the property ex:employer relates a subject, which is of type foaf:Person, to an object, which is of type foaf:Organization:

ex:employer rdfs:domain foaf:Person

ex:employer rdfs:range foaf:Organization

Given the previous two declarations, the following triple requires that ex:John is necessarily a foaf:Person, and ex:CompanyX is necessarily a foaf:Organization:

ex:John ex:employer ex:CompanyX

For example, the following declares that 'Every Person is an Agent':

foaf:Person rdfs:subClassOf foaf:Agent

Hierarchies of classes support inheritance of a property domain and range (see definitions in next section) from a class to its subclasses.

Utility Properties

RDFS Entailment

An entailment regime defines by RDFs (,OWL, etc.) not only which entailment relation is used, but also which queries and graphs are well-formed for the regime. The RDFS entailment is a standard entailment relations in the semantic web.

For example, the following declares that 'Dog is an animal','Cat1 is a cat', 'Zoos host animals' and 'Zoo hosts the Cat2'  :

ex:dog1		rdf:type		ex:animal
ex:cat1		rdf:type		ex:cat
zoo:host	rdfs:range		ex:animal
ex:zoo1		zoo:host		ex:cat2

But this graph is not well formed because the system can not guess that a cat is an animal. We have to add 'Cats are animals' to do a well-formed graph with :

ex:cat		rdfs:subClassOf		ex:animal

Voila, the correct example:

In english The graph
  • Dog is an animal
  • Cat1 is a cat
  • Cats are animals
  • Zoos host animals
  • Zoo hosts the Cat2
En RDF/turtle
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex:   <http://example.org/> .
@prefix zoo:   <http://example.org/zoo/> .
ex:dog1	   rdf:type	    ex:animal .
ex:cat1	   rdf:type	    ex:cat .
ex:cat	   rdfs:subClassOf  ex:animal .
zoo:host   rdfs:range	    ex:animal .
ex:zoo1	   zoo:host	    ex:cat2 .

If your triplestore (or RDF database) implements the regime entailment of RDF and RDFS, the SPARQL query as follows (the keyword "a" is equivalent to rdf:type in SPARQL):

PREFIX  ex: <http://example.org/>
SELECT ?animal
WHERE
  { ?x a ex:animal . }

Give the following result with cat2 because the Cat's type inherits of Animal's type:

animal
<http://example.org/dog1>
<http://example.org/cat1>
<http://example.org/cat2>

See also

References

External links